Skip to content

docs: add AGENTS.md for non-interactive CLI usage#96

Open
crowlbot wants to merge 1 commit into
feat/agent-whoamifrom
feat/agent-docs
Open

docs: add AGENTS.md for non-interactive CLI usage#96
crowlbot wants to merge 1 commit into
feat/agent-whoamifrom
feat/agent-docs

Conversation

@crowlbot
Copy link
Copy Markdown

Summary

Stacked on #95 (→ #94#93#92#91). Reference document for AI agents and CI systems driving deno deploy without a human at the terminal.

Complements per-command --help by capturing the conventions that span every subcommand and that aren't obvious without reading the source.

What's in this PR

  • Token authentication — env var, `--token`, keychain priority; the "never opens a browser" guarantee when a token is supplied explicitly.
  • Global flag set — `--json`, `--non-interactive` (and its `-y`/`--yes` aliases), `--quiet`, `--debug`, `--endpoint`, `--token`, `--config`.
  • Exit-code taxonomy — the OK=0, GENERIC=1, USAGE=2, AUTH=3, NOT_FOUND=4, CONFLICT=5, NETWORK=6 table from feat: add --json, --non-interactive flags and exit-code taxonomy #91, with the convention that agents check the code before parsing stderr.
  • Structured error envelope — the `{ error: { code, message, hint, traceId } }` shape.
  • JSON output schemas — one section per command that already emits JSON: `whoami`, `orgs list`, `apps list`, `deployments list`, `env list`, `database list`/`query`, `publish`, `create` (--dry-run and github source), and the NDJSON shape for `logs`.
  • Non-interactive flag coverage matrix — required flags per subcommand under `--non-interactive`.
  • Stdio discipline rules — what lands on stdout vs stderr.
  • Five copy-pasteable example flows — auth check, create + publish, re-deploy to existing app, env load, pagination, AWS setup.

Test plan

🤖 Generated with Claude Code

@crowlbot crowlbot force-pushed the feat/agent-whoami branch from fa27fdd to 2ae29f3 Compare May 13, 2026 13:57
Reference for AI agents and CI systems driving `deno deploy` without a
human at the terminal. Documents:

- Token authentication (env var, --token, keychain) and the
  "never opens a browser" guarantee when a token is supplied
  explicitly.
- The global flag set: --json, --non-interactive (with -y/--yes
  aliases), --quiet, --debug, --endpoint, --token, --config.
- The exit-code taxonomy (OK=0, GENERIC=1, USAGE=2, AUTH=3,
  NOT_FOUND=4, CONFLICT=5, NETWORK=6) and how to consume it.
- The structured error envelope on stderr.
- JSON output schemas for every command that already emits JSON:
  whoami, orgs list, apps list, deployments list, env list,
  database list/query, publish, create (--dry-run and the github
  source), and the NDJSON shape for logs.
- Non-interactive flag coverage matrix per subcommand.
- Stdio discipline rules.
- Five copy-pasteable example flows: auth check, create + publish,
  re-deploy to existing app, env load, pagination, AWS setup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant